# coding=utf-8
from django.db import models
from plantform.models import Task

class Report(models.Model):
    task = models.ForeignKey(to=Task, on_delete=models.CASCADE, verbose_name="任务ID")
    keywords = models.CharField(verbose_name="关键词", max_length=100, default="人工智能")
    created_time = models.DateTimeField(verbose_name="创建时间", auto_now_add=True)
    report_info = models.TextField(verbose_name="报告所需要的数据", default="")
    # 1 表示完成 2表示进行中 3 表示失败
    report_status = models.PositiveSmallIntegerField(verbose_name="报告生成的状态", default=0)


    class Meta:
        verbose_name = '报告详情'
        verbose_name_plural = verbose_name
        ordering = ("-id", )
